/**
 * 
 */
package com.an.springbean;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;

/**
 * @author 86171
 *
 */
public class BeanLifeCycle {

	private static void lifeCycleInBeanFactory() {
		//装载配置摁键并启动容器
		Resource resource = new ClassPathResource("bean-lifecycle.xml");
	
		BeanFactory beanFactory = new DefaultListableBeanFactory();
		XmlBeanDefinitionReader beanDefinitionReader = new XmlBeanDefinitionReader((BeanDefinitionRegistry) beanFactory);
		beanDefinitionReader.loadBeanDefinitions(resource);
		
		
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
